package init

import (
	"fmt"
	"github.com/spf13/viper"
	"video_rpc/basic/config"
)

func ViperInit() {
	var err error
	viper.SetConfigFile("../init/dev.yaml")
	err = viper.ReadInConfig()
	if err != nil {
		fmt.Println(err)
		return
	}
	err = viper.Unmarshal(&config.AppConfig)
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println("配置", config.AppConfig)
}
